package function.Comparator;

import book.Book;

import java.util.Comparator;

public class StateComparator implements Comparator<Book> {
    @Override
    public int compare(Book o1, Book o2) {
        if(o1.isState() == true && o2.isState() == false){
            return 1;
        } else if (o1.isState() == o2.isState()) {
            return 0;
        }else{
            return -1;
        }
    }
}
